﻿/// <reference path="../Scripts/jquery-2.0.3.intellisense.js" />
/// <reference path="../Scripts/angular.js" />

var app = angular.module("app", []);

app.controller("mainCtrl", function ($scope) {
    $scope.one = "hello from one";
    $scope.two = "hello from two";
    $scope.template = "Templates/temp-one.html";

    $scope.changeDirective = function () {
        $scope.template = "Templates/temp-two.html";
    };

    //TODO link directive directiveOne to scope
});

app.directive("directiveOne", function () {
    return {
        scope:true,
        restrict: 'C',
        template: '<div>{{one}}</div>',
    };
});

app.directive("directiveTwo", function () {
    return {
        scope:true,
        restrict: 'C',
        template: '<div> Directive Two </div>',
    };
});